<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use  App\User;

class Discussion extends Model
{
//    protected $table='discussions';
    protected $fillable = ['title','body','user_id','last_user_id'];
    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function comments()
    {
        return $this->hasMany(Comment::class);
    }
}
